package com.springboot.springautowired.destoryBean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 注解参数方式销毁bean---xml destory-method的注解方式
 * @author mac
 * @date 2021/9/15 6:08 下午
 */
@Configuration
public class DestoryTest2 {
    @Bean(destroyMethod = "destoryMethod")
    public DestoryData getData(){
        return new DestoryData();
    }
}

class DestoryData{
    public void destoryMethod(){}
}